package com.huanletao.spring.ioc;


import org.springframework.stereotype.Component;

import java.util.StringJoiner;

/**
 *
 *
 */
@Component
public class Person {
    private String name;
    private Long id;
    private int age;
    private String address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Person.class.getSimpleName() + "[", "]")
                .add("name='" + name + "'")
                .add("id=" + id)
                .add("age=" + age)
                .add("address='" + address + "'")
                .toString();
    }
}
